<#include "overall_header.html">

						<form id="form_1" action="${se_page.post_action}" method="get">
							<fieldset class="display-options">
								<div class="options-group">
									${L("ticket.subject")}:
									<input type="text" value="${se_page.bean.subject}" size="15" maxlength="64" id="subject" name="subject">
									${L("project")}: 
									<select id="project_id" name="project_id">
										${se_page.project_options}
									</select>
									${L("tag.tags")}: 
									<select id="tag_id" name="tag_id">
										${se_page.tag_options}
									</select>
									<!-- ${L("ticket.type")}: 
									<select id="type" name="type">
										${se_page.type_options}
									</select> -->
									${L("ticket.status")}: 
									<select id="status" name="status">
										${se_page.status_options}
									</select>
									${L("ticket.owner")}: 
									<select id="owner_id" name="owner_id">
										${se_page.owner_options}
									</select>
								</div>
								<div class="options-group">
									${L("ticket.creator")}: 
									<select id="creator_id" name="creator_id">
										${se_page.creator_options}
									</select>
									${L("ticket.create-time")}: 
									<input type="text" value="<#if se_page.bean.createAfter??>${se_page.bean.createAfter?string('yyyy-MM-dd')}</#if>" size="15" maxlength="64" id="create_after" name="create_after"> - 
									<input type="text" value="<#if se_page.bean.createBefore??>${se_page.bean.createBefore?string('yyyy-MM-dd')}</#if>" size="15" maxlength="64" id="create_before" name="create_before"> 
									${L("log.orderby")}: 
									<select id="orderby" name="orderby">
										${se_page.orderby_options}
									</select>
									<select id="order" name="order">
										${se_page.order_options}
									</select>
									${L("ticket.show-closed")}: <input type="checkbox" id="show_closed" name="show_closed" value="1" <#if se_page.bean.showClosed == 1>checked</#if> />
									<input type="submit" value="${L("global.search")}" name="filter" class="button2">
								</div>
							</fieldset>
							<script type="text/javascript">
								$('#create_after').datepicker({ dateFormat: 'yy-mm-dd' });
								$('#create_before').datepicker({ dateFormat: 'yy-mm-dd' });
							</script>
						</form>

						<div style="float: right; margin: 15px 0pt 2px;" class="pagination">
							<strong>${se_page.bean.start}</strong> / <strong>${se_page.bean.size}</strong>
							${se_page.page_nav}
						</div>
						<div class="clearboth">&nbsp;</div>

						<table cellspacing="1">
							<thead>
								<tr>
									<#assign new_order = 1 - se_page.bean.order>
									<th width="50">
										<a href="${sf_configs.root_path}/ticket${sf_configs.extension}${se_page.bean.params}&orderby=0&order=<#if se_page.bean.orderby == 0>${new_order}<#else>${se_page.bean.order}</#if>">
										${L("ticket.id")}<#if se_page.bean.orderby == 0><#if new_order == 0>↑<#else>↓</#if></#if>
										</a>
									</th>
									<th width="100">${L("project")}</th>
									<th width="50">
										<a href="${sf_configs.root_path}/ticket${sf_configs.extension}${se_page.bean.params}&orderby=1&order=<#if se_page.bean.orderby == 1>${new_order}<#else>${se_page.bean.order}</#if>">
										${L("ticket.priority")}<#if se_page.bean.orderby == 1><#if new_order == 0>↑<#else>↓</#if></#if>
										</a>
									</th>
									<th width="50">
										<a href="${sf_configs.root_path}/ticket${sf_configs.extension}${se_page.bean.params}&orderby=5&order=<#if se_page.bean.orderby == 5>${new_order}<#else>${se_page.bean.order}</#if>">
										${L("ticket.status")}<#if se_page.bean.orderby == 5><#if new_order == 0>↑<#else>↓</#if></#if>
										</a>
									</th>
									<th>${L("ticket.subject")}</th>
									<th width="80">${L("ticket.owner")}</th>
									<th width="100">${L("ticket.creator")}</th>
									<th width="100">
										<a href="${sf_configs.root_path}/ticket${sf_configs.extension}${se_page.bean.params}&orderby=2&order=<#if se_page.bean.orderby == 2>${new_order}<#else>${se_page.bean.order}</#if>">
										${L("ticket.due-date")}<#if se_page.bean.orderby == 2><#if new_order == 0>↑<#else>↓</#if></#if>
										</a>
									</th>
									<th width="120">
										<a href="${sf_configs.root_path}/ticket${sf_configs.extension}${se_page.bean.params}&orderby=4&order=<#if se_page.bean.orderby == 4>${new_order}<#else>${se_page.bean.order}</#if>">
										${L("ticket.update-time")}<#if se_page.bean.orderby == 4><#if new_order == 0>↑<#else>↓</#if></#if>
										</a>
									</th>
								</tr>
							</thead>
							<tbody>
								<#list se_page.tickets as ticket> 
								<tr class="row<#if (ticket_index % 2) == 0>1<#else>2</#if>">
									<td>${ticket.id}</td>
									<td><#if ticket.project??>${ticket.project.name}<#else>${ticket.projectId}</#if></td>
									<td>${L("ticket.priority."+ticket.priority)}</td>
									<td>${L("ticket.status."+ticket.status)}</td>
									<td><a href="${sf_configs.root_path}/ticketview${sf_configs.extension}?id=${ticket.id}">${ticket.subject}</a></td>
									<td>
										<#if ticket.owner??><a href="${sf_configs.root_path}/userview${sf_configs.extension}?id=${ticket.ownerId}">${ticket.owner.name}</a></#if>
									</td>
									<td><#if ticket.creator??><a href="${sf_configs.root_path}/userview${sf_configs.extension}?id=${ticket.creatorId}">${ticket.creator.name}</#if></td>
									<td><#if ticket.dueDate??><span class="timestamp" <#if .now?date &gt; ticket.dueDate?date> style="color:#990000;"</#if>>${ticket.dueDate?string("yyyy-MM-dd")}</span></#if></td>
									<td><span class="timestamp">${ticket.updateTime?string("yyyy-MM-dd HH:mm")}</span></td>
								</tr>
								</#list>
							</tbody>
						</table>

						<div style="float: right; margin: 15px 0pt 2px;" class="pagination">
							<strong>${se_page.bean.start}</strong> / <strong>${se_page.bean.size}</strong>
							${se_page.page_nav}
						</div>

<#include "overall_footer.html">